package com.ruoyi.project.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.SubscribeMapper;
import com.ruoyi.project.system.domain.Subscribe;
import com.ruoyi.project.system.service.ISubscribeService;

/**
 * 订阅Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-05-18
 */
@Service
public class SubscribeServiceImpl implements ISubscribeService 
{
    @Autowired
    private SubscribeMapper subscribeMapper;

    /**
     * 查询订阅
     * 
     * @param id 订阅ID
     * @return 订阅
     */
    @Override
    public Subscribe selectSubscribeById(String id)
    {
        return subscribeMapper.selectSubscribeById(id);
    }

    /**
     * 查询订阅列表
     * 
     * @param subscribe 订阅
     * @return 订阅
     */
    @Override
    public List<Subscribe> selectSubscribeList(Subscribe subscribe)
    {
        return subscribeMapper.selectSubscribeList(subscribe);
    }

    /**
     * 新增订阅
     * 
     * @param subscribe 订阅
     * @return 结果
     */
    @Override
    public int insertSubscribe(Subscribe subscribe)
    {
        return subscribeMapper.insertSubscribe(subscribe);
    }

    /**
     * 修改订阅
     * 
     * @param subscribe 订阅
     * @return 结果
     */
    @Override
    public int updateSubscribe(Subscribe subscribe)
    {
        return subscribeMapper.updateSubscribe(subscribe);
    }

    /**
     * 批量删除订阅
     * 
     * @param ids 需要删除的订阅ID
     * @return 结果
     */
    @Override
    public int deleteSubscribeByIds(String[] ids)
    {
        return subscribeMapper.deleteSubscribeByIds(ids);
    }

    /**
     * 删除订阅信息
     * 
     * @param id 订阅ID
     * @return 结果
     */
    @Override
    public int deleteSubscribeById(String id)
    {
        return subscribeMapper.deleteSubscribeById(id);
    }
}
